package com.htfyun.eink.pw.draw;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Rect;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.htfyun.eink.pw.configs.PWConfig;
import com.htfyun.eink.pw.draw.cache.PWPathCacheManager;

import java.util.List;

/**
 * 维护 1 个 bmp: <br>
 * pw bmp: 底层手写 bmp;<br>
 */
public interface IPWDrawProperty extends IPWDrawPath {
    String TAG = "PWDraw";

    @Nullable
    View getBindView();

    /**
     * @return 底层手写 bmp
     */
    @NonNull
    Bitmap getBitmapOfPW();

    @NonNull
    Canvas getCanvasPW();

    @NonNull
    List<Rect> getClipOutRects();

    void computeClipOutPathByRects(@NonNull Path clipOutPath, @NonNull List<Rect> rects);

    @NonNull
    PWPathCacheManager getPathCacheManager();

    void invalidate();

    void invalidate(Rect dirty);

}
